/**
 * 
 */
package com.swim.coach.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 私教Entity
 * @author 刘军武
 * @version 2021-05-06
 */
@Table(name="t_coach", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="name", attrName="name", label="姓名", queryType=QueryType.LIKE),
		@Column(name="mobile", attrName="mobile", label="手机号"),
		@Column(name="sex", attrName="sex", label="性别"),
		@Column(name="apply_state", attrName="applyState", label="申请状态"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class Coach extends DataEntity<Coach> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 姓名
	private String mobile;		// 手机号
	private String sex;		// 性别
	private Long applyState;		// 申请状态
	
	public Coach() {
		this(null);
	}

	public Coach(String id){
		super(id);
	}
	
	@NotBlank(message="姓名不能为空")
	@Length(min=0, max=10, message="姓名长度不能超过 10 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="手机号不能为空")
	@Length(min=0, max=30, message="手机号长度不能超过 30 个字符")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@NotBlank(message="性别不能为空")
	@Length(min=0, max=2, message="性别长度不能超过 2 个字符")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@NotNull(message="申请状态不能为空")
	public Long getApplyState() {
		return applyState;
	}

	public void setApplyState(Long applyState) {
		this.applyState = applyState;
	}
	
}